 package server.maps;

 import java.awt.Point;
 import java.util.HashMap;
 import java.util.Map;
 import tools.Pair;


 public class MapleReactorStats
 {
/*  11 */   private final Map<Byte, StateData> stateInfo = new HashMap<>();
   private Point tl;
   private Point br;

   public Point getTL() {
/*  16 */     return this.tl;
   }

   public void setTL(Point tl) {
/*  20 */     this.tl = tl;
   }

   public Point getBR() {
/*  24 */     return this.br;
   }

   public void setBR(Point br) {
/*  28 */     this.br = br;
   }

   public void addState(byte state, int type, Pair<Integer, Integer> reactItem, byte nextState, int timeOut, byte canTouch) {
/*  32 */     this.stateInfo.put(Byte.valueOf(state), new StateData(type, reactItem, nextState, timeOut, canTouch));
   }

   public byte getNextState(byte state) {
/*  36 */     StateData nextState = this.stateInfo.get(Byte.valueOf(state));
/*  37 */     if (nextState != null) {
/*  38 */       return nextState.getNextState();
     }
/*  40 */     return -1;
   }


   public int getType(byte state) {
/*  45 */     StateData nextState = this.stateInfo.get(Byte.valueOf(state));
/*  46 */     if (nextState != null) {
/*  47 */       return nextState.getType();
     }
/*  49 */     return -1;
   }


   public Pair<Integer, Integer> getReactItem(byte state) {
/*  54 */     StateData nextState = this.stateInfo.get(Byte.valueOf(state));
/*  55 */     if (nextState != null) {
/*  56 */       return nextState.getReactItem();
     }
/*  58 */     return null;
   }


   public int getTimeOut(byte state) {
/*  63 */     StateData nextState = this.stateInfo.get(Byte.valueOf(state));
/*  64 */     if (nextState != null) {
/*  65 */       return nextState.getTimeOut();
     }
/*  67 */     return -1;
   }


   public byte canTouch(byte state) {
/*  72 */     StateData nextState = this.stateInfo.get(Byte.valueOf(state));
/*  73 */     if (nextState != null) {
/*  74 */       return nextState.canTouch();
     }
/*  76 */     return 0;
   }


   private static class StateData
   {
     private final int type;
     private final int timeOut;
     private final Pair<Integer, Integer> reactItem;
     private final byte nextState;
     private final byte canTouch;

     private StateData(int type, Pair<Integer, Integer> reactItem, byte nextState, int timeOut, byte canTouch) {
/*  89 */       this.type = type;
/*  90 */       this.reactItem = reactItem;
/*  91 */       this.nextState = nextState;
/*  92 */       this.timeOut = timeOut;
/*  93 */       this.canTouch = canTouch;
     }

     private int getType() {
/*  97 */       return this.type;
     }

     private byte getNextState() {
/* 101 */       return this.nextState;
     }

     private Pair<Integer, Integer> getReactItem() {
/* 105 */       return this.reactItem;
     }

     private int getTimeOut() {
/* 109 */       return this.timeOut;
     }

     private byte canTouch() {
/* 113 */       return this.canTouch;
     }
   }
 }


/* Location:              C:\PGX\Server.jar!\server\maps\MapleReactorStats.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */